﻿
Option Strict On

Imports System.Configuration

Namespace Configuration

    Public Class MultiPlugConfig
        Inherits System.Configuration.ConfigurationSection


        Public Const MULTI_PLUG_CONFIG_NAME As String = "multiPlugConfig"


        Public Sub New()
            MyBase.New()

        End Sub


        <ConfigurationProperty("connectionName", IsRequired:=True)> _
        Public Property ConnectionName As String
            Get
                Return CStr(Me("connectionName"))
            End Get
            Set(ByVal value As String)
                Me("connectionName") = value
            End Set
        End Property


        <ConfigurationProperty("connectionString", IsRequired:=True)> _
        Public Property ConnectionString As String
            Get
                Return CStr(Me("connectionString"))
            End Get
            Set(ByVal value As String)
                Me("connectionString") = value
            End Set
        End Property


        <ConfigurationProperty("connectionProvider", IsRequired:=True)> _
        Public Property ConnectionProvider As String
            Get
                Return CStr(Me("connectionProvider"))
            End Get
            Set(ByVal value As String)
                Me("connectionProvider") = value
            End Set
        End Property

        <ConfigurationProperty("dataAssemblyPath", IsRequired:=True)> _
        Public Property DataAssemblyPath As String
            Get
                Return CStr(Me("dataAssemblyPath"))
            End Get
            Set(ByVal value As String)
                Me("dataAssemblyPath") = value
            End Set
        End Property

        <ConfigurationProperty("serviceTypes", IsDefaultCollection:=True)> _
        Public Property ServiceTypes As ServiceTypeCollection
            Get
                Return CType(Me("serviceTypes"), ServiceTypeCollection)
            End Get
            Set(ByVal value As ServiceTypeCollection)
                Me("serviceTypes") = value
            End Set
        End Property


        'Friend Sub New()

        '    ServiceTypes = New List(Of ServiceType)

        'End Sub


    End Class

End Namespace